FROM keymetrics/pm2:latest-alpine
WORKDIR /usr/src/app
ADD ./bestlyg-server /usr/src/app
RUN npm config set registry https://registry.npm.taobao.org/ && \  
    npm i
# RUN npm i
EXPOSE 10000
#pm2在docker中使用命令为pm2-docker
# CMD ["pm2-runtime", "start", "--json", "process.json"]
CMD ["pm2-runtime", "start",  "main.js"]
# CMD ["npm","run","start:prod"]